def partition(n, m):
    # 无法划分为指定个数的子集
    if n < m:
        return 0
    
    # 所有元素都放在一个子集中
    if m == 1:
        return 1
    
    result = 0

    # 递归调用
    for i in range(1, n+1):
        result += partition(n-i, m-1)
    
    return result

# 读取输入数据
with open('input.txt', 'r') as file:
    line = file.readline().strip()
    n, m = map(int, line.split())

# 调用算法计算并输出结果
result = partition(n, m)
with open('output.txt', 'w') as file:
    file.write(str(result))
